<?php /* Smarty version Smarty-3.1.13, created on 2013-08-13 09:01:52
         compiled from "/var/www/html/templates/en/newsletters/edit.tpl" */ ?>
<?php /*%%SmartyHeaderCode:209531515551fe9f3bc00a49-58441773%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b2d81f13badf12dc8e440c5cce5f4d12a7b5a2a6' => 
    array (
      0 => '/var/www/html/templates/en/newsletters/edit.tpl',
      1 => 1375809547,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '209531515551fe9f3bc00a49-58441773',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_51fe9f3bd81129_00970562',
  'variables' => 
  array (
    'link_return' => 0,
    'msg' => 0,
    'action' => 0,
    'subject' => 0,
    'published' => 0,
    'fromname' => 0,
    'fromemail' => 0,
    'groups' => 0,
    'arr_groups' => 0,
    'group' => 0,
    'html' => 0,
    'altbody' => 0,
    'body' => 0,
    'php5WebPath' => 0,
    'grouptotal' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51fe9f3bd81129_00970562')) {function content_51fe9f3bd81129_00970562($_smarty_tpl) {?><?php if (!is_callable('smarty_function_ckeditor')) include '/var/www/html/includes/smarty.libs/plugins/function.ckeditor.php';
?>
<script>
function updateAcyEditor(v)
{
	if(v==1) {
		window.document.getElementById("textfieldset0").style.display = 'none';
		window.document.getElementById("textfieldset1").style.display = 'block';
	} else {
		window.document.getElementById("textfieldset1").style.display = 'none';
		window.document.getElementById("textfieldset0").style.display = 'block';
	}
}
</script>
<style>
form {
	margin: 0;
	padding: 0;
}
</style>

<!-- Content Area -->

<div class="dma-thumbnail">
    <div class="content">
            
        <div class="header">
            
            <h1 class="page-title">EDIT NEWSLETTER</h1>
        </div>
        
        <ul class="breadcrumb">
            <li><a href="#">Home</a> <span class="divider">/</span></li>
            <li><a href="<?php echo $_smarty_tpl->tpl_vars['link_return']->value;?>
">Newsletter</a> <span class="divider">/</span></li>
            <li class="active">Edit</li>
        </ul>        
		<?php if ($_smarty_tpl->tpl_vars['msg']->value){?>
        <div class="alert alert-success">
         <button class="close" data-dismiss="alert" type="button">×</button>
        <?php echo $_smarty_tpl->tpl_vars['msg']->value;?>
   
        </div>
        <?php }?>    
        <div class="container-fluid">
        	<form name="frmAdmin" action="<?php echo $_smarty_tpl->tpl_vars['action']->value;?>
" method="post">
            <div class="row-fluid">
                <div class="btn-toolbar">
                    <button class="btn btn-primary" type="button" onclick="javascript:document.frmAdmin.submit();"><i class="icon-save"></i> Save</button>
                    <a href="<?php echo $_smarty_tpl->tpl_vars['link_return']->value;?>
" data-toggle="modal" class="btn">Cancel</a>
                  <div class="btn-group">
                  </div>
                </div>
                <div class="well">
                    <label class="control-label">Subject</label>
                    <input type="text" name="subject" id="subject" value="<?php echo $_smarty_tpl->tpl_vars['subject']->value;?>
" />
                    <label>Published</label>
                    <label class="checkbox inline">
                        <input type="radio" id="publish1" name="publish" value="1"  <?php if ($_smarty_tpl->tpl_vars['published']->value){?>checked="checked"<?php }?> /> Yes
                    </label>
                    <label class="checkbox inline">
                        <input type="radio" id="publish0" name="publish" value="0" <?php if (!$_smarty_tpl->tpl_vars['published']->value){?>checked="checked"<?php }?>  /> No
                    </label>
                    <label class="control-label">From Name</label>
                    <input id="fromname" type="text" name="fromname" size="40" value="<?php echo $_smarty_tpl->tpl_vars['fromname']->value;?>
" />
                    <label class="control-label">Subject</label>
                    <input id="fromemail" type="text" name="fromemail" size="40" value="<?php echo $_smarty_tpl->tpl_vars['fromemail']->value;?>
" />
                    <?php if ($_smarty_tpl->tpl_vars['groups']->value){?>
                    <label class="control-label">List User Groups</label>
                    <?php  $_smarty_tpl->tpl_vars['arr_groups'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['arr_groups']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['groups']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['arr_groups']->key => $_smarty_tpl->tpl_vars['arr_groups']->value){
$_smarty_tpl->tpl_vars['arr_groups']->_loop = true;
?>
                    	<div>
                    	<?php  $_smarty_tpl->tpl_vars['group'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['group']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['arr_groups']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['group']->key => $_smarty_tpl->tpl_vars['group']->value){
$_smarty_tpl->tpl_vars['group']->_loop = true;
?>
                        	<?php if ($_smarty_tpl->tpl_vars['group']->value['id']){?>
                            <label class="checkbox inline">
                                <input type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['group']->value['id'];?>
" name="chkGroup[]" id="chkGroup<?php echo $_smarty_tpl->tpl_vars['group']->value['idx'];?>
" <?php if ($_smarty_tpl->tpl_vars['group']->value['checked']){?>checked<?php }?> /> <?php echo $_smarty_tpl->tpl_vars['group']->value['name'];?>

                            </label>
                            <?php }?>
                        <?php } ?>
                        </div>
                    <?php } ?>
                    <?php }?>                                
                                
                                                             
                    <label>Send HTML Version </label>
                    <label class="checkbox inline">
                        <input type="radio" name="htmls" id="html0" value="1" <?php if ($_smarty_tpl->tpl_vars['html']->value==1){?> checked="checked" <?php }?> onclick="updateAcyEditor(1)" /> Yes
                    </label>
                    <label class="checkbox inline">
                        <input type="radio" name="htmls" id="html1" value="0" <?php if ($_smarty_tpl->tpl_vars['html']->value==0){?> checked="checked" <?php }?> onclick="updateAcyEditor(0)" /> No
                    </label> 
				
                    <fieldset class="adminform" width="100%" id="textfieldset0" <?php if ($_smarty_tpl->tpl_vars['html']->value==1){?> style="display:none" <?php }?>>
                      <legend>Text Version</legend>
                      <textarea style="width:98%" rows="20" name="altbody" id="altbody" ><?php echo $_smarty_tpl->tpl_vars['altbody']->value;?>
</textarea>
                    </fieldset>
                    <fieldset class="adminform" width="100%" id="textfieldset1" <?php if ($_smarty_tpl->tpl_vars['html']->value==0){?> style="display:none" <?php }?>>
                      <legend>HTML Version</legend>
                      <?php echo smarty_function_ckeditor(array('name'=>'body','id'=>'body','value'=>$_smarty_tpl->tpl_vars['body']->value,'height'=>400,'width'=>800,'toolbar'=>'Default'),$_smarty_tpl);?>

                       <div style="color:#666; font-style:italic;">Link to track: <?php echo $_smarty_tpl->tpl_vars['php5WebPath']->value;?>
/track.php?type=1&redirect=[path] </div>
                    </fieldset>                    
                </div>
                                                       
            </div>
            <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['grouptotal']->value;?>
" name="grouptotal" />
              <input type="hidden" id="tempid" name="tempid" value="0" />
              <input type="hidden" id="html" name="html" value="0" />
              <input type="hidden" name="type" value="news" />            
            </form>
        </div>
    </div>
</div>
  <!-- end of element-box -->
  
  <noscript>
  Warning! JavaScript must be enabled for proper operation of the Administrator backend.
  </noscript>
  <div class="clr"></div>
</div>
<!-- end of content --> 
<?php }} ?>